package com.jia.member.controller;


import com.jia.member.entity.Member;
import com.jia.member.feign.coupon.Coupon;
import com.jia.member.feign.coupon.CouponFeignClient;
import com.jia.member.service.MemberService;
import com.jia.member.vo.MemberCoupons;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 会员(Member)表控制层
 *
 * @author makejava
 * @since 2025-07-28 17:37:36
 */
@RestController
@RequestMapping("member")
public class MemberController {
    /**
     * 服务对象
     */
    @Resource
    private MemberService memberService;

    @Resource
    private CouponFeignClient couponFeignClient;

    @GetMapping("/coupon")
    public MemberCoupons coupon() {
        MemberCoupons memberCoupons = new MemberCoupons();
        memberCoupons.setNickname("爱吃一品汤包的绝迹");
        List<Coupon> list = couponFeignClient.list();
        memberCoupons.setCoupons(list);
        return memberCoupons;
    }

}

